interface CreateInvoiceAPIResData {
  code: number
  msg: string
  time: string
  data: null
}

interface CreateInvoiceAPIData {
  order_type: string
  ids: string
  invoice_title: string
  ratepay_number: string
  money: string
  email: string
  address?: string
  mobile?: string
  bank?: string
  bank_account?: string
  type: string
}

export function CreateInvoiceAPI(data: CreateInvoiceAPIData, token: string) {
  return httpInstance.post<CreateInvoiceAPIResData, CreateInvoiceAPIData>(
    '/api/intercity/invoiceadd',
    data,
    { headers: { token } },
  )
}
